﻿<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="Equipment.Business" %>
<%@ Import Namespace="Equipment.DataAccess" %>
<br />
<%  Dim hist As ModificationHistory = ViewData("History")%>
<table>
    <tr>
        <th width="70px">
            Name:
        </th>
        <td align="left">
            <%: hist.Name%>
        </td>
    </tr>
    <tr>
        <th>
            Action:
        </th>
        <td align="left">
             <%: DirectCast(hist.Action, ModificationAction).ToString()%>
        </td>
    </tr>
    <tr>
        <th>
            Posted By:
        </th>
        <td align="left">
            <%: hist.ModifiedByUser.FullName%>
        </td>
    </tr>
    <tr>
        <th>
            Posted On:
        </th>
        <td align="left">
            <%: TimeZoneManager.ConvertToUserTimeStringFor(hist.ActionDate)%>
        </td>
    </tr>
    <tr>
        <th class="top">
            Summary:
        </th>
        <td align="left">
            <%: TimeZoneManager.ConvertToUserTimeStringFor(hist.ActionDate)%>.<br />
            <%: hist.Name%> was 
            <%= DirectCast(hist.Action, ModificationAction).ToString().ToLower()%> by <%: hist.ModifiedByUser.FullName%>.<br /><br />
            <ul>
            <%  For Each item In hist.Details.Split(",")
                    If Not String.IsNullOrEmpty(item) Then%>
            <li><%= item%></li><br />
            <%End If
            Next%>
            </ul>
        </td>
    </tr>
</table>
